<#include "/common/_layout.html"/>
<@layout/>
<script type="text/javascript" src="${ctx}/static/js/voucher.js"></script>
</head>
<body class="easyui-layout">
<div data-options="region:'west',split:true,border:false,title:'凭证列表'"  style="width: 400px">
<table id="tg" data-options="toolbar:'#toolbar',singleSelect: true,onClickRow: function(rowIndex, rowData){$('#dg').datagrid('load',{voucherId:rowData.voucherId});}">
	<thead>
		<tr>
				<th data-options="field:'id',hidden:true">id</th>
				<th align="center" data-options="field:'voucherId'" width="16%">凭证字号</th>
				<th align="center" data-options="field:'date'" width="24%">日期</th>
				<th align="center" data-options="field:'maker'" width="20%">制单人</th>
				<th align="center" data-options="field:'auditor',formatter:function(value,row,index){if(value==null){return '未审核';}else{return value;}}" width="20%">审核人</th>
				<th align="center" data-options="field:'isClose',formatter:function(value,row,index){if(value=='1'||value==1){return '已关账';}else{return '未关账'}}" width="20%">是否已关账</th>
		</tr>
	</thead>
</table>
</div> 

  <div data-options="region:'center',split:true,border:false,title:'凭证明细'">
	<table id="dg">
		<thead>
			<tr>
				<th data-options="field:'id',hidden:true">id</th>
				<th align="center" width="12%" data-options="field:'date'">日期</th>
				<th align="center" width="8%" data-options="field:'voucherId'">凭证字号</th>
				<th align="center" width="25%" data-options="field:'summary'">摘要</th>
				<th align="center" width="15%" data-options="field:'name'">科目</th>
				<th align="center" width="15%"  data-options="field:'debitAmount'">借方金额</th>
				<th align="center" width="15%"  data-options="field:'creditAmount'">贷方金额</th>
				<th align="center" width="10%" data-options="field:'maker'">制单人</th>
			</tr>
		</thead>
	</table>
</div>

<div id="toolbar" style="padding:5px;height:auto;">
    <div  style="display:inline;margin-left:5px;">
     <a class="easyui-linkbutton" id="add" iconCls="icon-add" plain="true">新增</a><span class="toolbar-item dialog-tool-separator"></span>
     <a class="easyui-linkbutton" id="edit" iconCls="icon-edit" plain="true">修改明细</a><span class="toolbar-item dialog-tool-separator"></span>
	 <a class="easyui-linkbutton" id="search" iconCls="icon-search" plain="true">查询</a><span class="toolbar-item dialog-tool-separator"></span>
	 <a class="easyui-linkbutton" id="showAll" iconCls="icon-tip" plain="true">显示所有</a><span class="toolbar-item dialog-tool-separator"></span>
	 <a class="easyui-linkbutton" id="close" iconCls="icon-tip" plain="true">本月关账</a>
	</div>
</div>


<div id="addDialog" class="easyui-dialog" data-options="closed:true,modal:true" style="width:600px;height:420px;">
<#include "add.html"/>
</div>

<div id="searchDialog" class="easyui-dialog" data-options="closed:true,modal:true" style="width:300px;height:170px;">
<form id="searchForm" method="post">
<div style="margin: 10px 10px 10px 10px;">
<div style="margin-top:5px;">日期：<input id="date1" type="text" class="easyui-datebox"
				style="width: 100px;" />至<input id="date2" type="text" class="easyui-datebox" style="width: 100px;" /><br></div>
<div style="margin-top:5px;">凭证字号：<input id="voucherid" type="text" style="width: 50px;" /><br></div>
<div style="margin-top:5px;">制单人：<input id="themaker" type="text" style="width: 50px;" /></div>
</div>
</form>
</div>

</body>
</html>